//
//  OrderViewController.m
//  BP_NewClient
//
//  Created by letv on 15/5/1.
//  Copyright (c) 2015年 normal. All rights reserved.
//

#import "OrderViewController.h"
#import "OrderTableViewCell.h"
#import "OrderDetailViewController.h"

@interface OrderViewController ()

@end

@implementation OrderViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"订单";
    [self setTableViewHeightWithTabBarhidden:NO];
    [self addGetMoreFootView];
    self._tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}

// 覆盖加载更多方法
- (void)addGetMoreFootView{

}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self hideTabbar:NO];
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 5;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 186;
}


-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *identy = @"OrderTableViewCell";
    OrderTableViewCell  *cell = [tableView dequeueReusableCellWithIdentifier:identy];
    
    NSArray *nibs;
    if (nil == cell) {
        nibs = [[NSBundle mainBundle]loadNibNamed:@"OrderTableViewCell" owner:nil options:nil];
    }
    cell = [nibs objectAtIndex:0];
    
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    

    OrderDetailViewController *orderDetail = [[OrderDetailViewController alloc] init];
    [self.navigationController pushViewController: orderDetail animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
